package com.angel.architecture.hibernate3;

import org.apache.log4j.Logger;
import org.hibernate.event.PreInsertEvent;
import org.hibernate.event.PreInsertEventListener;

/**
 * Clase que implementa el listener utilizado por hibernate en los insert
 * Permite interceptar todo insert y ejecutar acciones previamente.
 *
 * @author IFritzler
 *
 */
public class SecurityPreInsertEventListener implements PreInsertEventListener {

	private static final long serialVersionUID = 1L;

	private static final Logger LOGGER = Logger.getLogger(SecurityPreInsertEventListener.class);

	public boolean onPreInsert(PreInsertEvent event) {
		LOGGER.info("On pre insert event listener: SecurityPreInsertEventListener");
		return false;
	}

}
